package com.wangzhen.spring.bean.definition;

import org.springframework.beans.MutablePropertyValues;
import org.springframework.beans.factory.BeanFactory;
import org.springframework.beans.factory.config.BeanDefinition;
import org.springframework.beans.factory.support.BeanDefinitionBuilder;
import org.springframework.beans.factory.support.GenericBeanDefinition;

import com.wangzhen.spring.ioc.dependcy.entity.User;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * BeanDefinition
 * @author dell
 * @since 2020/10/21 12:54
 */
public class BeanAliasDemo {

    public static void main(String[] args) {
        BeanFactory factory = new ClassPathXmlApplicationContext("classpath:/META-INF/alias-context.xml");
        User superman = factory.getBean("superman", User.class);
        User user = factory.getBean("user", User.class);
        System.out.println("superman == user "+ (superman == user) );
    }
}
